const setFontSize = (minFontSize = 12, maxFontSize = 16) => {
  window.onresize = () => {
    // 7.5根据设计稿的横向分辨率/100得来
    var deviceHeight = document.documentElement.clientHeight;
    // 获取浏览器宽度
    if (deviceHeight > 750) {
      deviceHeight = 1080;
    } else if (!deviceHeight) {
      return;
    }
    // 此时的fontSize大小为50px(375屏幕的时候)
    // document.documentElement.style.fontSize = `${deviceWidth / 67.5}px`;
    var k = 1200;

    // 禁止双击放大
    document.documentElement.addEventListener(
      "touchstart",
      function (event) {
        if (event.touches.length > 1) {
          event.preventDefault();
        }
      },
      false
    );
    var lastTouchEnd = 0;
    document.documentElement.addEventListener(
      "touchend",
      function (event) {
        var now = Date.now();
        if (now - lastTouchEnd <= 300) {
          event.preventDefault();
        }
        lastTouchEnd = now;
      },
      false
    );
  };
};
export default {
  setFontSize,
};
